<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        a{text-decoration: none;}
    </style>
</head>
<body>
<h3 style="text-align: center;">学生管理列表</h3>
<table border='2' style="width:400px;height:130px;border-collapse: collapse;margin:0px auto;text-align:center;">
    <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>性别</td>
        <td>班级</td>
        <td>操作</td>
    </tr>
    {foreach $students as $row}
        <tr>
            <td>{$row['st_id']}</td>
            <td>{$row['st_name']}</td>
            <td>{$row['st_gender']}</td>
            <td>
<!--                {foreach $row['classes'] as $data}-->
<!--                {$data['cl_name']}-->
<!--            {/foreach}-->
                {$row['classes']['cl_name']}
            </td>
            <!—注意 查看详细信息的链接地址一定把学生id一并写入-->
            <td><a
                    href="http://localhost/task_4/student/public/index.php/index/index/Showinfo?st_id={$row['st_id']}">查看详细信息
            </a></td>
        </tr>
    {/foreach}
</table>
</body>
</html>